package com.sdcs.server.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sdcs.server.daoimpl.DiscussDaoImpl;
import com.sdcs.server.model.Discuss;

@Service
public class DiscussService {
	@Autowired
	private DiscussDaoImpl discussDaoImpl;

	public List<Discuss> getAll(String news_id) {
		return discussDaoImpl.getAll(news_id);
	}

	public Discuss getObjectById(String id) {
		return discussDaoImpl.getObjectById(id);
	}

	public void update(String id, String answer) {
		discussDaoImpl.update(id, answer);
	}

	public void save(Discuss object) {
		discussDaoImpl.save(object);
	}

	public void delete(String id) {
		discussDaoImpl.delete(id);
	}
}
